<div class="col-md-6">
    <div class="form-group">
        <div class="col-md-4" style="padding-bottom: 0px;">
            <button type="button" class="btn btn-success btn-sm" onclick="add_data();">Add Data</button>
        </div>
        <div class="col-md-4" style="padding-bottom: 0px;">
            <button type="button" class="btn btn-success btn-sm" onclick="add_messenger();">Add Messenger </button>
        </div>
    </div>
</div>
<div id="tablecontent" class="col-md-12">						
    <div class="form-group">
        <div class="table-responsive">
            <table class="table table-bordered table-condensed table-striped" style="background:#f9f9f9;">
                <thead>
                    <tr>
						<th class="tblhead" style="width:10px;text-align:center;">No</th>
						<th class="tblhead" style="width:15px;text-align:center;">Messenger Name</th>
						<th class="tblhead" style="width:15px;text-align:center;">Picket Date</th>
						<th class="tblhead" style="width:15px;text-align:center;">Assign To</th>
						<th class="tblhead" style="width:15px;text-align:center;">Approval Status</th>
					</tr>
                </thead>
                <tbody>
                    <?php
                    if (empty($list_data)) {
                        ?>
                        <tr><td colspan="8" style="text-align:center">No Data Available</td></tr>
                        <?php
                    } else {
                        foreach ($list_data as $row) {
                            ?>
                            <tr>
                                <?php
                                $messenger_name = $row["MESSENGER_NAME"];
                                $messenger_date = $row["TRANS_DATE"];
                                $messenger_status = $row["TRANS_STATUS"];
                                $messenger_app = $row["TRANS_APP"];

                                $status_app = '';
                                if ($messenger_app == 'Y') {
                                    $status_app = '<font color="blue">Approved</font>';
                                }

                                if ($messenger_app == 'N') {
                                    $status_app = '<font color="red">Not Approved</font>';
                                }
                                 ?>  

                                <td style="text-align:center;"><?php echo $row["RECNUM"]; ?>.</td>
                                <td style="text-align:left;"><?php echo ucfirst($messenger_name); ?></td>
                                <td style="text-align:center;"><?php echo $messenger_date; ?></td>
                                <td style="text-align:center;"><?php echo $messenger_status; ?></td>
                                <td style="text-align:center;"><?php echo $status_app; ?></td>
                            </tr>
                            <?php
                        }
                    }
                    ?>
                </tbody>
            </table>
        </div>
    </div>
    <div class="form-group">
        <div id="mypaging">
            <?php
            echo $paging;
            echo $jump_page;
            echo $ipp;
            ?>
        </div>								
    </div>						
</div>